package com.hcj.springcloud.MyThreadExample.thread;

/**
 * Created by xxx on 2016/3/3.
 */
public class Interrupted {
    public static  void main(String[] args){
        Thread currentThread = Thread.currentThread();
        currentThread.interrupt();
        System.out.println("当前currentThread线程是否停止：  "+currentThread.interrupted());
        System.out.println("当前currentThread线程是否停止：  "+currentThread.interrupted());
        System.out.println("当前currentThread线程是否停止：  "+currentThread.interrupted());
        System.out.println("当前Thread线程是否停止：  "+Thread.interrupted());
        System.out.println("当前Thread线程是否停止：  "+Thread.interrupted());
        System.out.println("当前Thread线程是否停止：  "+Thread.interrupted());
    }
}
